import * as actionTypes from './constant'
import { fromJS } from 'immutable'

export const changeFullScreen = data => ({
  type: actionTypes.SET_FULL_SCREEN,
  data
})

export const changePlayingState = data => ({
  type: actionTypes.SET_PLAYING_STATE,
  data
})

export const changeSequencePlayList = data => ({
  type: actionTypes.SET_SEQUENCE_PLAY_LIST,
  data: fromJS(data)
})

export const changePlayList = data => ({
  type: actionTypes.SET_PLAY_LIST,
  data: fromJS(data)
})

export const changeMode = data => ({
  type: actionTypes.SET_MODE,
  data
})

export const changeCurrentIndex = data => ({
  type: actionTypes.SET_CURRENT_INDEX,
  data
})

export const changeCurrentSong = data => ({
  type: actionTypes.SET_CURRENT_SONG,
  data: fromJS(data)
})

export const changeShowPlayList = data => ({
  type: actionTypes.SET_SHOW_PLAY_LIST,
  data
})
